﻿<UserControl
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             xmlns:Helpers_Converters="clr-namespace:Helpers.Converters;assembly=Helpers" 
			 xmlns:CustomControls_InheritedFrameworkControls="clr-namespace:CustomControls.InheritedFrameworkControls" xmlns:CircularButton="clr-namespace:CustomControls.CircularButton" x:Name="userControl" 
			 x:Class="CustomControls.MapLocation.MapDirectionStepsView" 
             mc:Ignorable="d" Width="370" Height="596" >
	<UserControl.Resources>
		<Helpers_Converters:SubtractValueConverter x:Key="SubtractValueConverter"/>
		<Style x:Key="ButtonFocusVisual">
			<Setter Property="Control.Template">
				<Setter.Value>
					<ControlTemplate>
						<Rectangle Stroke="Black" StrokeDashArray="1 2" StrokeThickness="1" Margin="2" SnapsToDevicePixels="true"/>
					</ControlTemplate>
				</Setter.Value>
			</Setter>
		</Style>
		<LinearGradientBrush x:Key="ButtonNormalBackground" EndPoint="0,1" StartPoint="0,0">
			<GradientStop Color="#F3F3F3" Offset="0"/>
			<GradientStop Color="#EBEBEB" Offset="0.5"/>
			<GradientStop Color="#DDDDDD" Offset="0.5"/>
			<GradientStop Color="#CDCDCD" Offset="1"/>
		</LinearGradientBrush>
		<SolidColorBrush x:Key="ButtonNormalBorder" Color="#FF707070"/>
		<Style x:Key="PrimaryButtonStyle" TargetType="{x:Type Button}">
			<Setter Property="FocusVisualStyle" Value="{StaticResource ButtonFocusVisual}"/>
			<Setter Property="Background" Value="{StaticResource ButtonNormalBackground}"/>
			<Setter Property="BorderBrush" Value="{StaticResource ButtonNormalBorder}"/>
			<Setter Property="BorderThickness" Value="1"/>
			<Setter Property="Foreground" Value="White"/>
			<Setter Property="FontWeight" Value="Bold"/>
			<Setter Property="FontSize" Value="14"/>
			<Setter Property="HorizontalContentAlignment" Value="Center"/>
			<Setter Property="VerticalContentAlignment" Value="Center"/>
			<Setter Property="Padding" Value="1"/>
			<Setter Property="Template">
				<Setter.Value>
					<ControlTemplate TargetType="{x:Type Button}">
						<Border x:Name="border" Margin="{TemplateBinding Padding}" Background="{TemplateBinding Background}" BorderBrush="#FF4B4A4A" BorderThickness="1" CornerRadius="5">
							<StackPanel Orientation="Horizontal" Margin="10" HorizontalAlignment="Center">
								<ContentPresenter SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" RecognizesAccessKey="True" Margin="0" Height="Auto" d:LayoutOverrides="Width"/>
							</StackPanel>
						</Border>
						<ControlTemplate.Triggers>
							<Trigger Property="IsEnabled" Value="false">
								<Setter Property="Foreground" Value="DarkGray"/>
								<Setter Property="Background" Value="LightGray" TargetName="border"/>
								<Setter Property="BorderBrush" Value="Gray" TargetName="border"/>
							</Trigger>
						</ControlTemplate.Triggers>
					</ControlTemplate>
				</Setter.Value>
			</Setter>
		</Style>
		<Style x:Key="SlideTouchButtonStyle" TargetType="{x:Type CustomControls_InheritedFrameworkControls:TouchButton}">
			<Setter Property="FocusVisualStyle" Value="{StaticResource ButtonFocusVisual}"/>
			<Setter Property="Background" Value="{StaticResource ButtonNormalBackground}"/>
			<Setter Property="BorderBrush" Value="{StaticResource ButtonNormalBorder}"/>
			<Setter Property="BorderThickness" Value="1"/>
			<Setter Property="Foreground" Value="White"/>
			<Setter Property="FontWeight" Value="Bold"/>
			<Setter Property="FontSize" Value="14"/>
			<Setter Property="HorizontalContentAlignment" Value="Center"/>
			<Setter Property="VerticalContentAlignment" Value="Center"/>
			<Setter Property="Padding" Value="1"/>
			<Setter Property="Template">
				<Setter.Value>
					<ControlTemplate TargetType="{x:Type CustomControls_InheritedFrameworkControls:TouchButton}">
						<Border x:Name="border" Margin="1.333,1,-4.333,1" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="0,32,32,0">
							<ContentPresenter SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" RecognizesAccessKey="True" Margin="0" Height="Auto" HorizontalAlignment="Center" VerticalAlignment="Center"/>
						</Border>
						<ControlTemplate.Triggers>
							<Trigger Property="IsEnabled" Value="false">
								<Setter Property="Foreground" Value="DarkGray"/>
								<Setter Property="Background" Value="LightGray" TargetName="border"/>
								<Setter Property="BorderBrush" Value="Gray" TargetName="border"/>
							</Trigger>
						</ControlTemplate.Triggers>
					</ControlTemplate>
				</Setter.Value>
			</Setter>
		</Style>	
	</UserControl.Resources>
	<!--<UserControl.Effect>
		<DropShadowEffect ShadowDepth="0" BlurRadius="22"/>
	</UserControl.Effect>-->
    <Grid>
		<DockPanel>
			<Border Background="#FFCCCCCC" DockPanel.Dock="Bottom" Height="15" Margin="0" VerticalAlignment="Bottom" BorderThickness="1,0,2,0" BorderBrush="#FF9D9D9D"/>
			<Border x:Name="titleBorder" BorderThickness="1,0,2,0" Width="Auto" DockPanel.Dock="Top" MinHeight="55" VerticalAlignment="Top" Background="#FFCCCCCC" BorderBrush="#FF9D9D9D">
				<StackPanel Margin="0,0,0,15">
					<Border BorderBrush="#FF818181" BorderThickness="0,0,0,2" Height="35">
						<TextBlock TextWrapping="Wrap" FontSize="16" FontWeight="Bold" Text="DIRECTIONS" Foreground="#FF818181" Height="21.28" Width="94"/>
					</Border>
					<StackPanel Margin="20,10,0,0" Orientation="Horizontal" HorizontalAlignment="Left">
						<TextBlock TextWrapping="Wrap" Text="From : " HorizontalAlignment="Center" Foreground="#FF818181" VerticalAlignment="Center"/>
						<TextBlock TextWrapping="Wrap" Text="{Binding OriginAddress}" HorizontalAlignment="Center" Foreground="#FF818181"/>
					</StackPanel>
					<StackPanel Margin="20,10,0,0" Orientation="Horizontal" HorizontalAlignment="Left">
						<TextBlock TextWrapping="Wrap" Text="To : " HorizontalAlignment="Center" Foreground="#FF818181" VerticalAlignment="Center"/>
						<TextBlock TextWrapping="Wrap" Text="{Binding DestinationAddress}" HorizontalAlignment="Center" Foreground="#FF818181"/>
					</StackPanel>
					<StackPanel Margin="20,10,0,0" Orientation="Horizontal" HorizontalAlignment="Left">
						<TextBlock TextWrapping="Wrap" Text="Duration : " HorizontalAlignment="Center" Foreground="#FF818181" VerticalAlignment="Center"/>
						<TextBlock TextWrapping="Wrap" Text="{Binding TotalDuration}" HorizontalAlignment="Center" Foreground="#FF818181"/>
						<TextBlock TextWrapping="Wrap" Text="Distance : " HorizontalAlignment="Center" Foreground="#FF818181" VerticalAlignment="Center" Margin="10,0,0,0"/>
						<TextBlock TextWrapping="Wrap" Text="{Binding TotalDistance}" HorizontalAlignment="Center" Foreground="#FF818181"/>
					</StackPanel>
				</StackPanel>
			</Border>
			<Border x:Name="border"
				DockPanel.Dock="Bottom" Margin="0,-0.5,0,0" Width="Auto" BorderThickness="1,0,2,0" BorderBrush="#FF9D9D9D" Background="#FFCCCCCC" >
				<DockPanel x:Name="dockPanel"
					Background="#FFCCCCCC" Height="{Binding ActualHeight, ElementName=border, Mode=OneWay}" VerticalAlignment="Top">
                    <CustomControls_InheritedFrameworkControls:IPhoneScrollViewer x:Name="scrollViewer" Margin="20,8" DockPanel.Dock="Top" Height="{Binding ActualHeight, ConverterParameter=20, Converter={StaticResource SubtractValueConverter}, ElementName=dockPanel, Mode=OneWay}" ScrollViewer.VerticalScrollBarVisibility="Hidden" Foreground="{x:Null}">
                        <!--<CustomControls_InheritedFrameworkControls:IPhoneScrollViewer.Effect>
							               <DropShadowEffect ShadowDepth="0" BlurRadius="22"/>
                        </CustomControls_InheritedFrameworkControls:IPhoneScrollViewer.Effect>-->
						<Border HorizontalAlignment="Stretch" Background="White" BorderThickness="1" BorderBrush="#FF818181">
							<!--<Border.Effect>
								<DropShadowEffect ShadowDepth="0" BlurRadius="21" Direction="0"/>
							</Border.Effect>-->
							<StackPanel
								x:Name="stepsContainer" Orientation="Vertical" CanVerticallyScroll="True"/>
						</Border>
                    </CustomControls_InheritedFrameworkControls:IPhoneScrollViewer>
				</DockPanel>
			</Border>
		</DockPanel>
		<CustomControls_InheritedFrameworkControls:TouchButton x:Name="closeButton" Style="{DynamicResource SlideTouchButtonStyle}" HorizontalAlignment="Right" VerticalAlignment="Center" Height="76.333" Margin="0,0,-67.667,0" BorderBrush="#FF949BA6" Foreground="#FF4D4D4D" Width="67.667" FontWeight="Bold" FontSize="24" BorderThickness="0,2,2,2" Background="#FFCCCCCC">
    		  	<CircularButton:CircularToggleButton x:Name="menuButton" HorizontalAlignment="center" VerticalAlignment="Center" CheckedImage="images/menuButtonPressed.png" UncheckedImage="images/menuButton.png"/>
		</CustomControls_InheritedFrameworkControls:TouchButton>
	</Grid>
</UserControl>
